home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
prog_c
/
lsdoor09.zip
/
EXAMP2B.CPP
< prev
next >
Wrap
Text File
|
1996-05-15
|
777b
|
34 lines
// Example2B.Cpp - Touched up Example2.Cpp, looks much nicer.
#define MainModule
#include "LsDoor.H"
char *errorModule( void ){ return "Example IIb"; } // Identify ourself...
char c;
void main( void )
{
if( !DoorInit( doorsysDISABLE ) ) exit(1); // Get things started...
display("\n@WS@wtar @WW@wings @WG@wame" );
while( online )
{
display("\n@CD@co you wish to play? (@GY@w/@gN@c) ");
c = toupper( s_in() );
if( c == 'Y' || c == '\r' )
{
echo_yn('Y'); display("\nGame over."); exit(0);
}
if( c == 'N' )
{
echo_yn('N'); display("\nReturning to the 20th century."); break;
}
}
exit(0); // Always use exit()
}
// End of Example2B.Cpp